]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowIcon: Subclass St.BoxLayout
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 15 Aug 2018 19:02:49 +0000 (16:02 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Oct 2018 01:42:24 +0000 (22:42 -0300)
Following the previous work, turn WindowIcon into a
St.BoxLayout subclass, and remove the this.actor
field from it.

js/ui/altTab.js

index a98848103d986e1ab741df0ef6dfcabcae05b36c..d6d99f270a32d8f57101c4967ab7b0540f9d9896 100644 (file)
@@ -997,15 +997,17 @@ var ThumbnailList = new Lang.Class({
 
 var WindowIcon = new Lang.Class({
     Name: 'WindowIcon',
+    Extends: St.BoxLayout,
 
     _init(window, mode) {
+        this.parent({ style_class: 'alt-tab-app',
+                      vertical: true });
+
         this.window = window;
 
-        this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
-                                        vertical: true });
         this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() });
 
-        this.actor.add(this._icon, { x_fill: false, y_fill: false } );
+        this.add(this._icon, { x_fill: false, y_fill: false } );
         this.label = new St.Label({ text: window.get_title() });
 
         let tracker = Shell.WindowTracker.get_default();
@@ -1070,7 +1072,7 @@ var WindowList = new Lang.Class({
             let win = windows[i];
             let icon = new WindowIcon(win, mode);
 
-            this.addItem(icon.actor, icon.label);
+            this.addItem(icon, icon.label);
             this.icons.push(icon);
 
             icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {